//
// Created by bing on 2021/7/9.
//

#include <iostream>
#include <fstream>
#include "IOStreamDemo.h"

using namespace std;

int IOStreamDemo::main() {
    string name;
    int age;
    ofstream ofile("student.txt");

    cout << "please enter name and age.";
    while (cin >> name >> age) {
        cout << "name: " << name << " age:" << age << endl;
        ofile << "name: " << name << " age:" << age << endl;
    }

    cout << "exit!";
}


void Base::sayHello() {
    cout << "hello";
}
